<template>
  <div id="content">
    <keep-alive>
      <!-- 动态绑定不能直接写，子组件名字，要在父组件的data中现定义一个变量，在赋值为子组件名 -->
      <component :is='currentCpn'>
        
      </component>
    </keep-alive>

  </div>
</template>

<script>
import Home from './content/Home.vue';
import StuManaga from './content/StuManaga.vue';

export default {
  components:{
    Home,
    StuManaga,
  },
  data:function() {
    return{
      currentCpn:'Home',
    }
  },
  
}
</script>

<style>

</style>
